﻿using System.Collections.Generic;

namespace 解释器模式
{
    //中英文对照字典如下
    public static class ChineseEnglishDict
    {
        private static Dictionary<string, string> _dictory = new Dictionary<string, string>();

        static ChineseEnglishDict()
        {
            _dictory.Add("this", "这");
            _dictory.Add("is", "是");
            _dictory.Add("an", "一个");
            _dictory.Add("apple", "苹果");

        }

        public static string GetEnglish(string value)
        {
            return _dictory[value];
        }
    }
}
